version: "3"
services:
  nacos:
    hostname: nacos-{{ global_bond_ip | ansible.utils.ip4_hex }}
    container_name: nacos-{{ global_bond_ip | ansible.utils.ip4_hex }}
    image: nacos/nacos-server:{{ combined_vars.nacos_version }}
    volumes:
      - {{ combined_vars.nacos_deploy_path }}/logs:/home/nacos/logs
    network_mode: host
    env_file:
      - {{ combined_vars.nacos_deploy_path }}/nacos-hostname.env
    restart: always
    extra_hosts:
{% for host in groups['nacos'] %}
      - "nacos{{ loop.index }}:{{ host }}"
{% endfor %}